package com.lanchetech.dao;

import com.lanchetech.bean.request.CardConsumptionFundItemReq;
import com.lanchetech.bean.request.TenantPageReq;
import com.lanchetech.bean.vo.CardConsumptionFundItemVo;
import com.lanchetech.bean.vo.CardConsumptionFundVo;
import com.lanchetech.entity.CardConsumptionFundItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Ren
* @description 针对表【card_consumption_fund_item(消费金商品)】的数据库操作Mapper
* @createDate 2023-03-23 23:11:39
* @Entity com.lanchetech.entity.domain.CardConsumptionFundItem
*/
@Mapper
public interface CardConsumptionFundItemMapper {

    int deleteByPrimaryKey(Long id);

    int insert(CardConsumptionFundItem record);

    int insertSelective(CardConsumptionFundItem record);

    CardConsumptionFundItem selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CardConsumptionFundItem record);

    int updateByPrimaryKey(CardConsumptionFundItem record);

    List<CardConsumptionFundItemVo> getSpuByCardConsumptionFundId(CardConsumptionFundItemReq req);

    CardConsumptionFundVo getBySpuIdAndFundId(@Param("id") Long id,@Param("spuId") Long spuId);

    CardConsumptionFundItem getOneFundItemBySupId(@Param("cardConsumptionFundId") Long cardConsumptionFundId,@Param("spuId") Long spuId);

    void insertApply(@Param("spus") List<CardConsumptionFundItem> cardConsumptionFundItems);

    List<CardConsumptionFundItemVo> findAll(CardConsumptionFundItemReq req);

    List<CardConsumptionFundItemVo> getTenantId(TenantPageReq cardConsumptionFundId);
}
